package com.anyou.mall.order.orderServe.mapper;

import java.util.List;

import com.anyou.mall.order.domain.OrdOrder;
import com.anyou.mall.order.orderServe.domain.OrdOrderServe;
import com.anyou.mall.order.orderServe.vo.OrderServiceLogisticsVO;
import com.anyou.mall.order.orderServe.vo.UserInfoVo;
import com.anyou.mall.use.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * 订单售后Mapper接口
 *
 * @author ruoyi
 * @date 2022-03-23
 */
public interface OrdOrderServeMapper extends BaseMapper<OrdOrderServe> {
    /**
     * 查询订单售后
     *
     * @param orderServeId 订单售后主键
     * @return 订单售后
     */
    public OrdOrderServe selectOrdOrderServeByOrderServeId(Long orderServeId);

    /**
     * 查询订单售后列表
     *
     * @param ordOrderServe 订单售后
     * @return 订单售后集合
     */
    public List<OrdOrderServe> selectOrdOrderServeList(OrdOrderServe ordOrderServe);

    /**
     * 新增订单售后
     *
     * @param ordOrderServe 订单售后
     * @return 结果
     */
    public int insertOrdOrderServe(OrdOrderServe ordOrderServe);

    /**
     * 修改订单售后
     *
     * @param ordOrderServe 订单售后
     * @return 结果
     */
    public int updateOrdOrderServe(OrdOrderServe ordOrderServe);

    /**
     * 删除订单售后
     *
     * @param orderServeId 订单售后主键
     * @return 结果
     */
    public int deleteOrdOrderServeByOrderServeId(Long orderServeId);

    /**
     * 批量删除订单售后
     *
     * @param orderServeIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOrdOrderServeByOrderServeIds(Long[] orderServeIds);

    /**
     * 售后订单审核
     * @param serveNo
     * @param serveStatus
     * @param auditRemark
     * @param userId
     * @return
     */
    int audit(@Param("serveNo")String serveNo,@Param("serveStatus")String serveStatus,@Param("auditRemark")String auditRemark,@Param("userId")Long userId);

    /**
     * 售后订单完成
     * @param serveNo
     * @param serveStatus
     * @param userId
     * @return
     */
    int finish(@Param("serveNo")String serveNo,@Param("serveStatus")String serveStatus,@Param("userId")Long userId);


    /**
     * 售后订单发货
     * @param serveNo         售后订单号
     * @param logisticsId      物流公司id
     * @param logisticsNo  物流单号
     * @param userId         用户id
     * @return
     */
    int sendGoods(@Param("serveNo")String serveNo,@Param("logisticsId") Long logisticsId,@Param("logisticsNo") String logisticsNo,@Param("userId") Long userId);


    /**
     * 查询售后订单物流
     * @param orderServeId  售后订单编号
     * @return
     */
    OrderServiceLogisticsVO logisticsInfo(@Param("orderServeId")Long orderServeId);

    UserInfoVo userInfo(@Param("userId")Long userId);
}
